Apply SELinux labels to directories created by initscripts.
authorIan Campbell <ijc@hellion.org.uk>
Thu, 6 Nov 2014 11:32:39 +0000 (11:32 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 23 Jan 2017 16:23:58 +0000 (16:23 +0000)
Patch from Russell Coker. (Closes: #764912)

(cherry picked from commit 46a8d71bec748f3c6dfb98bf4ba3973a5b3cd951)

Conflicts:
debian/changelog

debian/changelog
debian/xen-utils-common.xen.init

index e7b0a1b30aeb632b37953963ad4b32f0582df9f1..9d0a9120054f95554f2f80f23cbf5bcad5dce3a8 100644 (file)
@@ -37,6 +37,8 @@ xen (4.8.0-1~) unstable; urgency=high
     Incorporate a timeout so as not to block boot (Mitigates #737613)
   * Correct syntax error in xen-init-list when running with xend
     (Closes: #763102)
+  * Apply SELinux labels to directories created by initscripts. Patch from
+    Russell Coker. (Closes: #764912)
 
   [ Lubomir Host ]
   * Fix xen-init-name to not fail looking for a nonexistent 'config'
index 1342a7d5d529833c49ed2f64cdfd9184fed60609..018c934405faf495e71567a4b2bf4fbe6f00d864 100644 (file)
@@ -69,6 +69,7 @@ env_setup()
        [ -d /run/xen ] && return 0
 
        mkdir -m 700 /run/xen
+       [ -x /sbin/restorecon ] && /sbin/restorecon /run/xen
 }
 
 xend_start()
@@ -247,6 +248,7 @@ xenstored_start()
        start-stop-daemon --start --quiet --pidfile "$XENSTORED_PIDFILE" --exec "$XENSTORED" --test > /dev/null \
                || return 1
        [ -d "$XENSTORED_DIR" ] || mkdir -p "$XENSTORED_DIR"
+       [ -x /sbin/restorecon ] && /sbin/restorecon "$XENSTORED_DIR"
        export XENSTORED_ROOTDIR="$XENSTORED_DIR"
        start-stop-daemon --start --quiet --pidfile "$XENSTORED_PIDFILE" --exec "$XENSTORED" -- \
                $XENSTORED_ARGS --pid-file="$XENSTORED_PIDFILE" \